package com.example.weathermvvm.data.db

/**
 *
 * @Author： LJH
 * @Time： 2022/8/10
 * @description：数据库类为应用提供与该数据库关联的 DAO 的实例。
 */
object WeatherDatabase {

    private var placeDao:PlaceDao? = null

    private var weatherDao:WeatherDao? = null

    fun getPlaceDao():PlaceDao{
        return if (placeDao == null) PlaceDao() else placeDao!!
    }

    fun getWeatherDao():WeatherDao {
        return if (weatherDao == null) WeatherDao() else weatherDao!!
    }
}